#include "drawbar.h"

void
pull_single_drawbar(drawbar_t drawbar[], int no, int newval) {
        drawbar[no] = newval;
}

void
zero_all_drawbar(drawbar_t drawbar[]) {
        unsigned char i;
        for (i = 1; i <= DRAWBAR_NUM ; ++i)
                drawbar[i] = 0;
}

void
pull_drawbar_from_str(drawbar_t drawbar[], char * strval) {
        unsigned char i;
        for (i = 1; i <= DRAWBAR_NUM; ++i)
		pull_single_drawbar(drawbar, i, strval[i] - '0');
}
